<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="ie=edge" />
        <title>Knockout.js</title>

        <link rel="stylesheet" href="style.css" />
    </head>
    <body>
        <div id="root">
            <p>class 的应用</p>
            <div data-bind="class: class1">ABC abc 白砂糖</div>
            <div data-bind="class: class2">ABC abc 白砂糖</div>
            <div class="green" data-bind="class: class3">ABC abc 白砂糖</div>
            <hr />
            <p>css 的应用</p>
            <div data-bind="css: { orange: true,bold:true }">
                ABC abc 白砂糖
            </div>
            <div data-bind="css: { red: true }">ABC abc 白砂糖</div>
            <div
                class="green"
                data-bind="css: { 'f-40': isF40(),'f-20':!isF40() }"
            >
                ABC abc 白砂糖
            </div>
            <p>style 的应用</p>
            <div class="green" data-bind="style: {'fontSize':isF40()?'40px':'20px'}">
                ABC abc 白砂糖
            </div>
        </div>
        <script src="../scripts/lib/require.js" data-main="index.js"></script>
    </body>
</html>
